<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>语句 | ccplus</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../c/file.html" />
    
    
    <link rel="prev" href="../c/variables.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="2.7"
        data-chapter-title="语句"
        data-filepath="c/statement.md"
        data-basepath=".."
        data-revision="Fri May 13 2016 17:02:07 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        目录
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="Android/index.html">
            
                
                    <a href="../Android/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        Android
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="Android/touchEvent.html">
            
                
                    <a href="../Android/touchEvent.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        触摸点击事件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="Android/screenAdaptation.html">
            
                
                    <a href="../Android/screenAdaptation.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        屏幕适配
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="Android/android4.0.html">
            
                
                    <a href="../Android/android4.0.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        4.0
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="c/index.html">
            
                
                    <a href="../c/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        c
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="c/Hello.html">
            
                
                    <a href="../c/Hello.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        Hello
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="c/DataType.html">
            
                
                    <a href="../c/DataType.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        数据类型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="c/operator.html">
            
                
                    <a href="../c/operator.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        运算符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="c/array.html">
            
                
                    <a href="../c/array.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        数组
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="c/pointer.html">
            
                
                    <a href="../c/pointer.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        指针
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="c/variables.html">
            
                
                    <a href="../c/variables.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        变量
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="2.7" data-path="c/statement.html">
            
                
                    <a href="../c/statement.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.</b>
                        
                        语句
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="c/file.html">
            
                
                    <a href="../c/file.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.</b>
                        
                        文件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.9" data-path="c/structure.html">
            
                
                    <a href="../c/structure.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.9.</b>
                        
                        结构体
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.10" data-path="c/function.html">
            
                
                    <a href="../c/function.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.</b>
                        
                        函数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.11" data-path="c/multisource.html">
            
                
                    <a href="../c/multisource.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.11.</b>
                        
                        多个源文件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.12" data-path="c/gdb.html">
            
                
                    <a href="../c/gdb.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.12.</b>
                        
                        gdb调试
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="linux/index.html">
            
                
                    <a href="../linux/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        Linux
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="linux/command/index.html">
            
                
                    <a href="../linux/command/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        命令
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="c++/index.html">
            
                
                    <a href="../c++/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        C++
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="c++/section1.html">
            
                
                    <a href="../c++/section1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        第一节
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="c++/section2.html">
            
                
                    <a href="../c++/section2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        第二节
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="java/index.html">
            
                
                    <a href="../java/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        java
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="java/jni-java.html">
            
                
                    <a href="../java/jni-java.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        jni-java
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="java/jni-android.html">
            
                
                    <a href="../java/jni-android.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        jni-android
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" data-path="gitbook/index.html">
            
                
                    <a href="../gitbook/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        gitbook
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1" data-path="gitbook/installation.html">
            
                
                    <a href="../gitbook/installation.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.</b>
                        
                        安装
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="gitbook/commands.html">
            
                
                    <a href="../gitbook/commands.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.</b>
                        
                        命令
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.3" data-path="gitbook/syntax.html">
            
                
                    <a href="../gitbook/syntax.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.3.</b>
                        
                        语法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.4" data-path="gitbook/settings.html">
            
                
                    <a href="../gitbook/settings.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.4.</b>
                        
                        配置
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.5" data-path="gitbook/plugins.html">
            
                
                    <a href="../gitbook/plugins.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.5.</b>
                        
                        插件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.6" data-path="gitbook/bookjson.html">
            
                
                    <a href="../gitbook/bookjson.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.6.</b>
                        
                        json
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >ccplus</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="c&#x8BED;&#x53E5;">c&#x8BED;&#x53E5;</h1>
<ol>
<li>while&#x8BED;&#x53E5;:while(){},&#x5C0F;&#x62EC;&#x53F7;&#x91CC;&#x9762;&#x53EA;&#x6709;&#x4E24;&#x79CD;&#x503C;:0&#x548C;&#x975E;&#x96F6;&#x3002;0&#x8868;&#x793A;&#x5047;&#xFF0C;&#x975E;&#x96F6;&#x8868;&#x793A;&#x771F;&#x3002;</li>
<li><p>for&#x5FAA;&#x73AF;</p>
<pre><code>for(&#x8868;&#x8FBE;&#x5F0F;1;&#x8868;&#x8FBE;&#x5F0F;2;&#x8868;&#x8FBE;&#x5F0F;3){
    //&#x5FAA;&#x73AF;&#x4F53;
}
</code></pre><p>&#x5728;for&#x5FAA;&#x73AF;&#x4E2D;&#xFF0C;&#x8868;&#x8FBE;&#x5F0F;1&#x662F;&#x4E00;&#x4E2A;&#x6216;&#x591A;&#x4E2A;&#x8D4B;&#x503C;&#x8BED;&#x53E5;&#xFF0C;&#x5B83;&#x7528;&#x6765;&#x63A7;&#x5236;&#x53D8;&#x91CF;&#x7684;&#x521D;&#x59CB;&#x503C;&#xFF1B;       &#x8868;&#x8FBE;&#x5F0F;2&#x662F;&#x4E00;&#x4E2A;&#x5173;&#x7CFB;&#x8868;&#x8FBE;&#x5F0F;&#xFF0C;&#x5B83;&#x51B3;&#x5B9A;&#x4EC0;&#x4E48;&#x65F6;&#x5019;&#x9000;&#x51FA;&#x5FAA;&#x73AF;&#xFF1B;&#x8868;&#x8FBE;&#x5F0F;3&#x662F;&#x5FAA;&#x73AF;&#x53D8;&#x91CF;&#x7684;&#x6B65;&#x8FDB;&#x503C;&#xFF0C;      &#x5B9A;&#x4E49;&#x63A7;&#x5236;&#x5FAA;&#x73AF;&#x53D8;&#x91CF;&#x6BCF;&#x5FAA;&#x73AF;&#x4E00;&#x6B21;&#x540E;&#x6309;&#x4EC0;&#x4E48;&#x65B9;&#x5F0F;&#x53D8;&#x5316;&#x3002;&#x8FD9;&#x4E09;&#x90E8;&#x5206;&#x4E4B;&#x95F4;&#x7528;&#x5206;&#x53F7;(;)&#x5206;&#x5F00;&#x3002;   </p>
<blockquote>
<p>&#x6CE8;&#x610F;:
1.for&#x5FAA;&#x73AF;&#x4E2D;&#x7684;&#x201C;&#x8868;&#x8FBE;&#x5F0F;1&#x3001;2&#x3001;3&#x201D;&#x5747;&#x53EF;&#x53EF;&#x4EE5;&#x7F3A;&#x7701;&#xFF0C;&#x4F46;&#x5206;&#x53F7;(;)&#x4E0D;&#x80FD;&#x7F3A;&#x7701;&#x3002;<br>2.&#x7701;&#x7565;&#x201C;&#x8868;&#x8FBE;&#x5F0F;1&#xFF08;&#x5FAA;&#x73AF;&#x53D8;&#x91CF;&#x8D4B;&#x521D;&#x503C;&#xFF09;&#x201D;&#xFF0C;&#x8868;&#x793A;&#x4E0D;&#x5BF9;&#x5FAA;&#x73AF;&#x53D8;&#x91CF;&#x8D4B;&#x521D;&#x59CB;&#x503C;.&#x4F8B;&#x5982;:</p>
</blockquote>
<pre><code class="lang-c"><span class="hljs-keyword">int</span> i=<span class="hljs-number">1</span>;<span class="hljs-comment">//&#x5B9A;&#x4E49;&#x5FAA;&#x73AF;&#x53D8;&#x91CF;&#x5E76;&#x8D4B;&#x521D;&#x59CB;&#x503C;</span>
<span class="hljs-keyword">for</span>(;i&lt;=<span class="hljs-number">10</span>;i++){<span class="hljs-comment">//&#x7701;&#x7565;&#x5FAA;&#x73AF;&#x53D8;&#x91CF;&#x8D4B;&#x521D;&#x59CB;&#x503C;</span>
    <span class="hljs-built_in">printf</span>(<span class="hljs-string">&quot;&quot;</span>);
}
</code></pre>
<p>3.&#x7701;&#x7565;&#x201C;&#x8868;&#x8FBE;&#x5F0F;2(&#x5FAA;&#x73AF;&#x6761;&#x4EF6;)&#x201D;&#xFF0C;&#x4E0D;&#x505A;&#x5176;&#x5B83;&#x5904;&#x7406;&#xFF0C;&#x5FAA;&#x73AF;&#x4E00;&#x76F4;&#x6267;&#x884C;&#xFF08;&#x6B7B;&#x5FAA;&#x73AF;&#xFF09; </p>
<pre><code class="lang-c"><span class="hljs-keyword">int</span> i;
<span class="hljs-keyword">for</span>(i=<span class="hljs-number">0</span>;;i++)<span class="hljs-comment">//&#x7701;&#x7565;&#x5FAA;&#x73AF;&#x6761;&#x4EF6;{</span>
    <span class="hljs-built_in">printf</span>(<span class="hljs-string">&quot;jakjakjak&quot;</span>);
}
</code></pre>
<p>4.&#x7701;&#x7565;&#x201C;&#x8868;&#x8FBE;&#x5F0F;3(&#x5FAA;&#x73AF;&#x53D8;&#x91CF;&#x589E;&#x91CF;)&#x201D;&#xFF0C;&#x4E0D;&#x505A;&#x5176;&#x4ED6;&#x5904;&#x7406;&#xFF0C;&#x5FAA;&#x73AF;&#x4E00;&#x76F4;&#x6267;&#x884C;&#xFF08;&#x6B7B;&#x5FAA;&#x73AF;&#xFF09;</p>
<pre><code class="lang-c">
<span class="hljs-keyword">int</span> i;
<span class="hljs-keyword">for</span>(i=<span class="hljs-number">0</span>;i&lt;<span class="hljs-number">10</span>;)<span class="hljs-comment">//&#x7701;&#x7565;&#x5FAA;&#x73AF;&#x53D8;&#x91CF;&#x589E;&#x91CF;{</span>
    <span class="hljs-built_in">printf</span>(<span class="hljs-string">&quot;jakjakjak&quot;</span>);
}
</code></pre>
<p>5.&#x8868;&#x8FBE;&#x5F0F;1&#x53EF;&#x4EE5;&#x662F;&#x8BBE;&#x7F6E;&#x5FAA;&#x73AF;&#x53D8;&#x91CF;&#x7684;&#x521D;&#x503C;&#x7684;&#x8D4B;&#x503C;&#x8868;&#x8FBE;&#x5F0F;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x662F;&#x5176;&#x4ED6;&#x8868;&#x8FBE;&#x5F0F;<br>&#x8868;&#x8FBE;&#x5F0F;1&#x548C;&#x8868;&#x8FBE;&#x5F0F;3&#x53EF;&#x4EE5;&#x662F;&#x4E00;&#x4E2A;&#x7B80;&#x5355;&#x8868;&#x8FBE;&#x5F0F;&#x4E5F;&#x53EF;&#x4EE5;&#x662F;&#x591A;&#x4E2A;&#x8868;&#x8FBE;&#x5F0F;&#x4EE5;&#x9017;&#x53F7;&#x5206;&#x5272;   </p>
<pre><code class="lang-c">
<span class="hljs-keyword">int</span> sum,num;
<span class="hljs-comment">//&#x5FAA;&#x73AF;&#x53D8;&#x91CF;&#x521D;&#x59CB;&#x8868;&#x8FBE;&#x5F0F;&#x53EF;&#x4EE5;&#x6362;&#x6210;&#x5176;&#x4ED6;&#x8868;&#x8FBE;&#x5F0F;</span>
<span class="hljs-keyword">for</span>(sum=<span class="hljs-number">0</span>,num=<span class="hljs-number">0</span>;num&lt;=<span class="hljs-number">3</span>;num++,sum++){
    <span class="hljs-built_in">printf</span>(<span class="hljs-string">&quot;jakjakjak&quot;</span>);
}
</code></pre>
<p>6.&#x8868;&#x8FBE;&#x5F0F;2&#x4E00;&#x822C;&#x662F;&#x5173;&#x7CFB;&#x8868;&#x8FBE;&#x5F0F;&#x6216;&#x903B;&#x8F91;&#x8868;&#x8FBE;&#x5F0F;&#xFF0C;&#x4F46;&#x4E5F;&#x53EF;&#x662F;&#x6570;&#x503C;&#x8868;&#x8FBE;&#x5F0F;&#x6216;&#x5B57;&#x7B26;&#x8868;&#x8FBE;&#x5F0F;&#xFF0C;&#x53EA;&#x8981;&#x5176;&#x503C;&#x975E;&#x96F6;&#xFF0C;&#x5C31;&#x6267;&#x884C;&#x5FAA;&#x73AF;&#x4F53;&#x3002;<br>7.&#x5404;&#x8868;&#x8FBE;&#x5F0F;&#x4E2D;&#x7684;&#x53D8;&#x91CF;&#x4E00;&#x5B9A;&#x8981;&#x5728;for&#x5FAA;&#x73AF;&#x4E4B;&#x524D;&#x5B9A;&#x4E49;.</p>
</li>
<li><p>switch case&#x8BED;&#x53E5;</p>
<ul>
<li>&#x5728;case&#x5B50;&#x53E5;&#x540E;&#x5982;&#x679C;&#x6CA1;&#x6709;break;&#x4F1A;&#x4E00;&#x76F4;&#x5F80;&#x540E;&#x6267;&#x884C;&#x4E00;&#x76F4;&#x5230;&#x9047;&#x5230;break;&#x624D;&#x4F1A;&#x8DF3;&#x51FA;switch&#x8BED;&#x53E5;&#x3002;   </li>
<li>switch&#x540E;&#x9762;&#x7684;&#x8868;&#x8FBE;&#x5F0F;&#x8BED;&#x53E5;&#x53EA;&#x80FD;&#x662F;&#x6574;&#x578B;&#x6216;&#x8005;&#x5B57;&#x7B26;&#x7C7B;&#x578B;&#x3002;</li>
<li>&#x5728;case&#x540E;&#xFF0C;&#x5141;&#x8BB8;&#x6709;&#x591A;&#x4E2A;&#x8BED;&#x53E5;&#xFF0C;&#x53EF;&#x4EE5;&#x4E0D;&#x7528;{}&#x62EC;&#x8D77;&#x6765;&#x3002;</li>
<li>&#x5404;case&#x548C;default&#x5B50;&#x53E5;&#x7684;&#x5148;&#x540E;&#x987A;&#x5E8F;&#x53EF;&#x4EE5;&#x53D8;&#x52A8;&#xFF0C;&#x800C;&#x4E0D;&#x4F1A;&#x5F71;&#x54CD;&#x7A0B;&#x5E8F;&#x6267;&#x884C;&#x7ED3;&#x679C;&#x3002;</li>
<li>default&#x5B50;&#x53E5;&#x53EF;&#x4EE5;&#x7701;&#x7565;&#x4E0D;&#x7528;&#x3002;</li>
</ul>
</li>
<li><p>goto&#x8BED;&#x53E5;</p>
<ul>
<li>goto&#x8BED;&#x53E5;&#x662F;&#x4E00;&#x79CD;&#x65E0;&#x6761;&#x4EF6;&#x5206;&#x652F;&#x8BED;&#x53E5;&#xFF0C;goto &#x8BED;&#x53E5;&#x7684;&#x4F7F;&#x7528;&#x683C;&#x5F0F;&#x4E3A;&#xFF1A;goto &#x8BED;&#x53E5;&#x6807;&#x53F7;;   </li>
<li>&#x8BED;&#x53E5;&#x6807;&#x53F7;&#x662F;&#x4E00;&#x4E2A;&#x6807;&#x8BC6;&#x7B26;&#xFF0C;&#x8BE5;&#x6807;&#x8BC6;&#x7B26;&#x4E00;&#x822C;&#x7528;&#x82F1;&#x6587;&#x5927;&#x5199;&#x5E76;&#x9075;&#x5B88;&#x6807;&#x8BC6;&#x7B26;&#x547D;&#x540D;&#x89C4;&#x5219;&#xFF0C;&#x8FD9;&#x4E2A;&#x6807;&#x8BC6;&#x7B26;&#x52A0;&#x4E0A;&#x4E00;&#x4E2A;&#x201C;:&#x201D;&#x4E00;&#x8D77;&#x51FA;&#x73B0;&#x5728;&#x51FD;&#x6570;&#x5185;&#x67D0;&#x5904;&#xFF0C;<br>&#x6267;&#x884C;goto&#x8BED;&#x53E5;&#x540E;&#xFF0C;&#x7A0B;&#x5E8F;&#x5C06;&#x8DF3;&#x8F6C;&#x5230;&#x8BE5;&#x6807;&#x53F7;&#x5904;&#x5E76;&#x6267;&#x884C;&#x5176;&#x540E;&#x7684;&#x8BED;&#x53E5;.</li>
<li>&#x4F8B;:</li>
</ul>
<pre><code class="lang-c"><span class="hljs-function"><span class="hljs-keyword">void</span> <span class="hljs-title">ff</span><span class="hljs-params">()</span></span>{
  <span class="hljs-keyword">int</span> sum=<span class="hljs-number">0</span>;
  <span class="hljs-keyword">int</span> i=<span class="hljs-number">1</span>;
  <span class="hljs-comment">//LOOP&#x5C31;&#x662F;&#x4E00;&#x4E2A;&#x6709;&#x6548;&#x6807;&#x8BC6;&#x7B26;</span>
  LOOP:<span class="hljs-keyword">if</span>(i&lt;<span class="hljs-number">10</span>)
  {
      sum+=i;
      i++;
      <span class="hljs-comment">//&#x8DF3;&#x8F6C;&#x5230;LOOP&#x6240;&#x5728;&#x4F4D;&#x7F6E;&#x7EE7;&#x7EED;&#x6267;&#x884C;</span>
      <span class="hljs-keyword">goto</span> LOOP;
  }
  <span class="hljs-built_in">printf</span>(<span class="hljs-string">&quot;sum=%d\n&quot;</span>,sum);
}
</code></pre>
</li>
</ol>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../c/variables.html" class="navigation navigation-prev " aria-label="Previous page: 变量"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../c/file.html" class="navigation navigation-next " aria-label="Next page: 文件"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
